<template>
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        订单管理
        <small>管理您的订单</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-calendar-minus-o"></i> 订单管理</a></li>
        <li class="active">我的待发货订单</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-xs-12">

          <div class="box" style=" background: #efefef">
            <div class="box-header">
              <h3 class="box-title">订单总览</h3>
              <router-link to="/main/addOrder">
                <button class="btn btn-success pull-right" type="button">添加订单</button>
              </router-link>
            </div>
            <section class="content">
              <div class="row">
                <div class="col-xs-12">

                  <div v-for="order in orderList" :key="order.id" class="box box-default"
                       style="border-radius: 15px;position: relative">
                    <img alt="1" src="../../../public/img/pendingorder.png"
                         style="width: 60px;margin-left: 10px;margin-top: 10px;border-radius: 5px"/>
                    <span style="margin-left: 10px;font-size: large;font-weight: bold">订单id：{{ order.id }}</span>
                    <span style="position: absolute;left: 80px;top: 50px"><span class="fa fa-user">&nbsp;&nbsp;</span>下单人：{{
                        order.orderUser
                      }}</span>
                    <span style="position: absolute;left: 55vw;top: 50px;font-weight: bold"><span class="fa fa-cny">&nbsp;&nbsp;</span>总价：{{
                        order.price
                      }}元</span>
                    <div
                        style="margin-left: 12px;margin-top: 7px;padding:0; width: 80vw;height:1px;background-color:#8aabe5;overflow:hidden;"></div>
                    <div style="margin-left: 15px;margin-top: 10px"><span
                        class="fa fa-phone">&nbsp;&nbsp;</span>联系电话：{{ order.orderPhone }}
                    </div>
                    <div style="margin-left: 15px;margin-top: 10px"><span class="fa fa-clock-o">&nbsp;&nbsp;</span>下单时间：{{
                        order.orderTime
                      }}
                    </div>
                    <div style="margin-left: 15px;margin-top: 10px"><span
                        class="fa fa-paper-plane-o">&nbsp;&nbsp;</span>发出时间：{{ order.sendTime }}
                    </div>
                    <div style="margin-left: 15px;margin-top: 10px"><span
                        class="fa fa-home">&nbsp;&nbsp;</span>收货地址：{{ order.orderLocation }}
                    </div>
                    <div style="margin-left: 15px;margin-top: 10px"><span
                        class="fa fa-calendar-minus-o">&nbsp;&nbsp;</span>订单状态：待发货
                    </div>
                    <span style="position: absolute;left: 52vw;top: 207px"><span
                        class="fa fa-dropbox">&nbsp;&nbsp;</span>拣货员：{{ order.operator }}</span>
                    <div
                        style="margin-left: 12px;margin-top: 7px;padding:0; width: 80vw;height:1px;background-color:#8aabe5;overflow:hidden;"></div>
                    <button class="btn btn-primary" style="margin-left: 65vw;margin-top: 15px" type="button"
                            @click="deliver">发货
                    </button>
                    <div>&nbsp;</div>
                  </div>

                </div>
                <!-- /.col -->
              </div>
              <!-- /.row -->
            </section>

          </div>

        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->

    <!-- 模态框 -->
    <div id="myModal" class="modal fade">
      <div class="modal-dialog modal-sm">
        <div class="modal-content">

          <!-- 模态框头部 -->
          <div class="modal-header">
            <h4 class="modal-title">提示</h4>
            <button class="close" data-dismiss="modal" type="button">&times;</button>
          </div>

          <!-- 模态框主体 -->
          <div class="modal-body">
            模态框内容..
          </div>

          <!-- 模态框底部 -->
          <div class="modal-footer">
            <button class="btn btn-secondary" data-dismiss="modal" type="button">关闭</button>
          </div>

        </div>
      </div>
    </div>

  </div>
  <!-- /.content-wrapper -->
</template>

<script>
export default {
  name: "MyWaitDeliverOrderData",
  data() {
    return {
      orderList: this.GLOBAL.appData.orderList,
    }
  },
  methods: {
    deliver() {
      this.$message.info("发货成功（模拟操作）");
      this.$router.push("/main/myWaitDeliverOrderData")
    }
  }
}
</script>

<style scoped>

</style>